package com.itpan.Mapper;

import com.itpan.Entity.Employee;
import com.itpan.Entity.Product;
import com.itpan.Entity.StatsByPrice;
import com.itpan.Entity.StatsByT;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

import java.util.List;

@Mapper
public interface ProductMapper {

    List<Product> findAll();

    List<Product> findAllPage(RowBounds rowBounds);

    List<Product> findByName(@Param(value = "Name") String Name);

    Product findById(@Param(value = "Id")String Id);
    void addOne(Product product);

    void addList(@Param(value = "list") List<Product> list);

    void update(Product product);

    void deleteById(@Param(value = "Id") String Id);


    List<Product> getbymutil(Product product);


    //根据价格统计区间
    List<StatsByPrice> statsbyprice();

    List<StatsByT> statsbyCustomer();


    List<Product> getbycid(@Param("id") String id);


}
